package com.ybkj.daijia.server.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ybkj.daijia.common.IdcardUtils;
import com.ybkj.daijia.common.OrderInfo;
import com.ybkj.daijia.server.freight.Truck;
import com.ybkj.daijia.server.model.UsuallyEmploy.ServiceType;
import java.math.BigDecimal;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils;

/**
 * 司机
 *
 * @author Shine
 */
@ToString
public class Driver extends Base {

    /**
     * 浏览器设备
     */
    public static final String DEVICE_BROWSER = "1";
    /**
     * PC设备
     */
    public static final String DEVICE_PC = "2";
    /**
     * Andriod设备
     */
    public static final String DEVICE_ANDRIOD = "3";
    /**
     * iOS设备
     */
    public static final String DEVICE_IOS = "4";
    /**
     * Windows Phone设备
     */
    public static final String DEVICE_WINDOWS_PHONE = "5";

    /**
     * 未上线
     */
    public static final int DRIVER_OFFLINE = 0;
    /**
     * 空闲（在线）
     */
    public static final int DRIVER_ONLINE = 1;
    /**
     * 已派单 司机有活跃订单,且任一活跃处于处于已派单,没有活跃订单处于已接单及更高
     */
    public static final int DRIVER_APPLY_ORDER = 2;

    /*
     *已接单 司机有活跃订单,有活跃订单处于已接单及更高,但总乘客量必须小于车辆的载客人数
     */
    public static final int DRIVER_ACCEPT_ORDER = 4;
    /**
     * 忙碌 所有订单处于已接单或更高,并且总乘客数等于车辆可载客人数
     */
    public static final int DRIVER_BUSY = 3;

    /**
     * 兼职
     */
    public static final String DRIVER_TYPR_PARTTIME = "兼职";

    /**
     * 全职
     */
    public static final String DRIVER_TYPR_FULLTIME = "全职";

    /**
     * 当前业务状态
     */
    public static final Integer DRIVER_JOBSTATUS_DAIJIA = 0;
    public static final Integer DRIVER_JOBSTATUS_ZHUANCHE = 1;
    public static final Integer DRIVER_JOBSTATUS_PAOTUI = 2;
    public static final Integer DRIVER_JOBSTATUS_FREIGHT = 3;
    public static final Integer DRIVER_JOBSTATUS_ZHUANXIAN = 4;

    public static final String QUALIFICATION_PHOTO_PATH = "upload/qualificationPhoto";
    public static final String ID_CARD_PHOTO_PATH = "upload/idCardPhoto";
    public static final String ID_CARD_PHOTO_BACK_PATH = "upload/idCardPhotoBackFile";
    public static final String LICENSE_PATH = "upload/license";
    public static final String DRIVER_PATH = "upload/driver";
    /**
     *
     */
    private static final long serialVersionUID = 1L;

    // @NotEmpty
    // @Pattern(regexp = "^[0-9a-z_A-Z\\u4e00-\\u9fa5]+$")
    // @Length(min = 2, max = 20)
    // @Column(nullable = false, updatable = false, unique = true)
    private String username;

    // @NotEmpty
    // @Pattern(regexp = "^[^\\s&\"<>]+$")
    // @Length(min = 4, max = 60)
    // @Column(nullable = false)
    @JsonIgnore
    private String password;

    private String name;// 昵称

    private String realname;// 真实姓名

    private String namePinyin;// 姓名拼音

    private String gender;// 性别

    @JsonIgnore
    private String idCard;// 身份证

    @JsonIgnore
    private String bankCard;// 绑定支付账号

    private String driverCensus;// 户口登记机关

    private String phone;// 手机号

    private String photo;// 头像

    @JsonIgnore
    private String idCardPhoto;// 身份证图片

    @JsonIgnore
    private String idCardHandPhoto;// 人手持身份证照片

    @JsonIgnore
    private String address;// 家庭住址

    @JsonIgnore
    private String pressingName;// 紧急联系人, 审核时填写的

    @JsonIgnore
    private String pressingPhone;// 紧急电话, 审核时填写的

    @JsonIgnore
    private Date licenseTime;// 领证时间

    @JsonIgnore
    private String license; // 驾驶证附件

    private String licenseType;// 驾照类型

    @JsonIgnore
    private String travel;// 行驶证附件

    @JsonIgnore
    private String introducer;// 介绍人

    @JsonIgnore
    private String memo;// 备注

    private Boolean isFreeze;// 冻结状态

    private Integer status;// 当前状态 0离线 1空闲 2已派单 3忙碌
    /**
     * 跑单状态,就4和1在用 0代驾 1专车 2跑腿 3货运 4专线
     */
    private Integer jobStatus;

    private Long companyId;

    private Company company;

    private Long carId;// 关联的汽车Id(专车)

    private Car car;

    private Long truckId;// 关联的货车Id

    private Truck truck;

    private Long zhuanxianCarId;// 关联的专线车辆Id

    private Truck zhuanxianCar;
    @JsonIgnore
    private String appVersion;// app版本

    private Integer driveTimes;// 代驾次数

    private BigDecimal virtual;// 余额

    @JsonIgnore
    private BigDecimal advance;// 预存款

    private String type;// 员工类型

    private Double longitude; // 经度

    private Double latitude; // 纬度

    private Date posUpdated;

    private Date jobTime;// 入职时间

    private Date dutyTime;// 上班时间

    private Integer todayOrders;// 本日代驾次数

    private Integer monthOrders;// 本月代驾次数

    private Double lastLongitude; // 经度

    private Double lastLatitude; // 纬度

    private String currentAddress;// 司机当前地址信息

    @JsonIgnore
    private String userID;

    @JsonIgnore
    private String registrationId;

    @JsonIgnore
    private String udid;

    private String deviceType; //安卓华为手机3;

    private String deviceInfo;// 移动端设备型号

    private Double distance;// 距离

    private String distanceStr;// 距离

    private Long driverLevelId;// 代驾提成id（老）

    private DriverLevel driverLevel;// 代驾提成（临时类）

    private DriverLevel driverLevelZhuan;// 专车提成（临时类）

    private DriverLevel driverLevelPao;// 跑腿提成（临时类）

    private DriverLevel driverLevelFreight;// 货运提成（临时类）

    private DriverLevel driverLevelZhuanxian;// 专线提成（临时类）

    private boolean isWorkCar;// 是否为工作车

    private Integer applyWorkCar;// 是否请求了工作车null无 ，0未接，1已接

    private Integer busyStatus;// 忙碌时详细状态null前往预约地 ，0等待客户，1前往目的地

    private Double starLevel;// 星级 评分

    private Integer height;// 身高（公分）

    private String origin;// 籍贯

    private String bigPhoto;// 司机大图

    @JsonIgnore
    private List<DriverChoseLevel> driverChoseLevels;// （临时类）

    @JsonIgnore
    private List<DriverChoseLevelCar> driverChoseLevelCars;// （临时类）

    @JsonIgnore
    private List<DriverChoseLevelPaotui> driverChoseLevelPaotuis; // （临时类）

    @JsonIgnore
    private List<DriverChoseLevelFreight> driverChoseLevelFreights; // （临时类）

    @JsonIgnore
    private List<DriverChoseLevelZhuanxian> driverChoseLevelZhuanxians; // （临时类）
    /**
     * 司机服务类型
     */
    private String driverJobType;

    private List<Order> workingOrders;// 当前工作中的订单

    private List<Order> yupaidanOrders;// 当前预派单订单

    private Order diaoduOrder;// 用户列表调度模式显示

    private Long yupai;// 预派订单数量

    private BigDecimal payCash1;// 司机端充值金额1，临时字段

    private BigDecimal payCash2;// 司机端充值金额2，临时字段

    private BigDecimal payCash3;// 司机端充值金额3，临时字段

    private Long paotuiAmount;// 当前跑腿单量 ，临时字段

    private OrderInfo orderInfo;// 当前订单 ，临时字段

    private String employToken;// 服务人员token,临时字段

    private Integer refreshTokenTime;// 临时字段，token刷新时间

    private String jobContent;// 任务内容，临时字段

    private ServiceType serviceType;// 当前收藏类型，临时字段

    private Long gradeId;// 司机等级

    private DriverGrade driverGrade;

    private Long seatsNow;// 当前人数，临时字段

    private Long seatsTotal;// 总共人数，临时字段

    private Integer grade;// 等级，临时字段

    private Integer driverStatus;// 临时字段

    private Double driverLat;// 临时字段

    private Double driverLng;// 临时字段

    private Boolean usuallyEmploy;// 临时字段

    /**
     * 专车新加
     */
    private String addressCode;// 平台的注册地行政区划代码

    private String addressCodeArr;// 平台的注册地行政区划代码(回显使用)

    private String driverLicenseNo;// 机动车驾驶证号

    private String driverLicenseId;//驾档编号

    private String nationality;// 国籍

    private Date birthday;// 出生日期

    @Getter@Setter
    private Date driverLicenseValid;// 驾驶证有效期起

    @Getter@Setter
    private Date driverLicenseInvalid;// 驾驶证有效期限止

    private String nation;// 驾驶员民族

    private Integer marital;// 驾驶员婚姻状况

    private String foreignLanguageAbility;// 驾驶员外语能力

    private String concatAddress;// 驾驶员通信地址

    private String education;// 驾驶员学历

    /**
     * 网络预约出租车驾驶员初次领证日期 networkCarIssueDate
     *
     */
    @Getter@Setter
    private String taxiLicenseRecive;
    /**
     * 网络预约出租车驾驶员证发证日期 networkCarIssueDate
     */
    @Getter@Setter
    private String taxiLicenseRegister;
    /**
     * 网络预约出租车驾驶员证编号 certificateNo
     */
    @Getter@Setter
    private String taxiLicenseNo;
    /**
     * 网络预约出租车驾驶员证有效期止 networkCarProofOff
     */
    @Getter@Setter
    private String taxiLicenseInvalid;
    /**
     * 网络预约出租车驾驶员证有效期起 networkCarProofOn
     */
    @Getter@Setter
    private String taxiLicenseValid;
    /**
     * 网络预约出租车驾驶员发证机构 networkCarIssueOrganization
     */
    @Getter@Setter
    private String taxiLicenseOrg;

    /**
     * 网约车初次领取资格证日期（yyyyMMdd)
     */
    @Getter@Setter
    private String networkCarProofDate;
    private Integer trafficViolation;// 交通违章次数

    private String contractCompany;// 驾驶员合同（或协议）签署公司

    private Date contractValid;// 合同有效期起

    private Date contractInvalid;// 合同有效期止

    private Integer cruise;// 是否巡游出租汽车驾驶员

    private Boolean inBlacklist;// 是否在黑名单内

    private String phoneOperator;// 司机服务运营商

    private String mapType;// 使用地图类型

    private String commercialType;// 服务类型,1：网络预约出租车2：巡游出租车3：私人小客车合乘

    private String emergencyAddress;// 紧急情况联系人通信地址

    private Double seviceReview;// 驾驶员服务质量信誉考核结果

    private String bankName;// 银行名

    private String bankNo;// 银行卡号

    private String skrName;// 提现人姓名

    private String detailedJobType; // 跑腿业务具体分类

    private String errandserviceType; // 跑腿服务人员类型

    private String platNo; // 跑腿车牌号

    private String emergency; // 紧急联系人 //司机申请注册时填写的

    private String errandType; // 跑腿类型

    private String carPhoto; // 车辆照片

    private String idCardPhotoBack;// 身份证背面

    private String qualificationPhoto; //网约车资格证书照片

    private Integer upStatus;//监管平台上传状态

    private Integer flag;// 操作表示1：新增2：更新3：删除

    private String backOfIdCardPhoto; //身份证背面照片

    private BigDecimal rebateMoney;// 司机推荐奖励金额

    private Integer tixian; //是否允许提现(0-不允许 1-允许)

    private Integer tuiguang; //是否允许推广奖励(0-不允许 1-允许)

    private String wxRebateQrCodeUrl; //微信司机推荐二维码

    /**
     * 是否加盟
     */
    @Getter@Setter
    private Boolean isLeague;

    /**
     * 身份证有效期开始时间
     */
    @Getter@Setter
    private String driverIdcardvalid;

    /**
     * 身份证有效期结束时间, 也可以填长期
     */
    @Getter@Setter
    private String driverIdcardInvalid;


    public Integer getTixian() {
        return tixian;
    }

    public void setTixian(Integer tixian) {
        this.tixian = tixian;
    }

    public String getWxRebateQrCodeUrl() {
        return wxRebateQrCodeUrl;
    }

    public void setWxRebateQrCodeUrl(String wxRebateQrCodeUrl) {
        this.wxRebateQrCodeUrl = wxRebateQrCodeUrl;
    }

    public boolean canTixian() {
        if (null == tixian || 1 == tixian.intValue()) {
            return true;
        }
        return false;
    }

    public boolean canTuiGuang() {
        if (null == tuiguang || 1 == tuiguang.intValue()) {
            return true;
        }
        return false;
    }

    public Integer getTuiguang() {
        return tuiguang;
    }

    public void setTuiguang(Integer tuiguang) {
        this.tuiguang = tuiguang;
    }

    public BigDecimal getRebateMoney() {
        return null != rebateMoney ? rebateMoney : BigDecimal.ZERO;
    }

    public void setRebateMoney(BigDecimal rebateMoney) {
        this.rebateMoney = rebateMoney;
    }

    public String getBackOfIdCardPhoto() {
        return backOfIdCardPhoto;
    }

    public void setBackOfIdCardPhoto(String backOfIdCardPhoto) {
        this.backOfIdCardPhoto = backOfIdCardPhoto;
    }

    public String getQualificationPhoto() {
        return qualificationPhoto;
    }

    public void setQualificationPhoto(String qualificationPhoto) {
        this.qualificationPhoto = qualificationPhoto;
    }

    public Integer getFlag() {
        return flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }

    public String getBankCard() {
        return bankCard;
    }

    public void setBankCard(String bankCard) {
        this.bankCard = bankCard;
    }

    public String getIdCardHandPhoto() {
        return idCardHandPhoto;
    }

    public void setIdCardHandPhoto(String idCardHandPhoto) {
        this.idCardHandPhoto = idCardHandPhoto;
    }

    public Integer getUpStatus() {
        return upStatus;
    }

    public void setUpStatus(Integer upStatus) {
        this.upStatus = upStatus;
    }

    public String getErrandType() {
        return errandType;
    }

    public void setErrandType(String errandType) {
        this.errandType = errandType;
    }

    public String getCarPhoto() {
        return carPhoto;
    }

    public void setCarPhoto(String carPhoto) {
        this.carPhoto = carPhoto;
    }

    public String getIdCardPhotoBack() {
        return idCardPhotoBack;
    }

    public void setIdCardPhotoBack(String idCardPhotoBack) {
        this.idCardPhotoBack = idCardPhotoBack;
    }

    public String getErrandserviceType() {
        return errandserviceType;
    }

    public void setErrandserviceType(String errandserviceType) {
        this.errandserviceType = errandserviceType;
    }

    public String getBankName() {
        return bankName;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName;
    }

    public String getBankNo() {
        return bankNo;
    }

    public void setBankNo(String bankNo) {
        this.bankNo = bankNo;
    }

    public String getSkrName() {
        return skrName;
    }

    public void setSkrName(String skrName) {
        this.skrName = skrName;
    }

    public String getPlatNo() {
        return platNo;
    }

    public void setPlatNo(String platNo) {
        this.platNo = platNo;
    }

    public String getEmergency() {
        return emergency;
    }

    public void setEmergency(String emergency) {
        this.emergency = emergency;
    }

    public String getDetailedJobType() {
        return detailedJobType;
    }

    public void setDetailedJobType(String detailedJobType) {
        this.detailedJobType = detailedJobType;
    }

    public String getDriverLicenseNo() {
        return driverLicenseNo;
    }

    public void setDriverLicenseNo(String driverLicenseNo) {
        this.driverLicenseNo = driverLicenseNo;
    }

    public String getNationality() {
        return nationality;
    }

    public void setNationality(String nationality) {
        this.nationality = nationality;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getNation() {
        return nation;
    }

    public void setNation(String nation) {
        this.nation = nation;
    }

    public Integer getMarital() {
        return marital;
    }

    public void setMarital(Integer marital) {
        this.marital = marital;
    }

    public String getForeignLanguageAbility() {
        return foreignLanguageAbility;
    }

    public void setForeignLanguageAbility(String foreignLanguageAbility) {
        this.foreignLanguageAbility = foreignLanguageAbility;
    }

    public String getConcatAddress() {
        return concatAddress;
    }

    public void setConcatAddress(String concatAddress) {
        this.concatAddress = concatAddress;
    }

    public String getEducation() {
        return education;
    }

    public void setEducation(String education) {
        this.education = education;
    }

    public Integer getTrafficViolation() {
        return trafficViolation;
    }

    public void setTrafficViolation(Integer trafficViolation) {
        this.trafficViolation = trafficViolation;
    }

    public Date getContractValid() {
        return contractValid;
    }

    public void setContractValid(Date contractValid) {
        this.contractValid = contractValid;
    }

    public Date getContractInvalid() {
        return contractInvalid;
    }

    public void setContractInvalid(Date contractInvalid) {
        this.contractInvalid = contractInvalid;
    }

    public Integer getCruise() {
        return cruise;
    }

    public void setCruise(Integer cruise) {
        this.cruise = cruise;
    }

    public Boolean getInBlacklist() {
        return inBlacklist;
    }

    public void setInBlacklist(Boolean inBlacklist) {
        this.inBlacklist = inBlacklist;
    }

    public String getPhoneOperator() {
        return phoneOperator;
    }

    public void setPhoneOperator(String phoneOperator) {
        this.phoneOperator = phoneOperator;
    }

    public String getMapType() {
        return mapType;
    }

    public void setMapType(String mapType) {
        this.mapType = mapType;
    }

    public String getEmergencyAddress() {
        return emergencyAddress;
    }

    public void setEmergencyAddress(String emergencyAddress) {
        this.emergencyAddress = emergencyAddress;
    }

    public Double getSeviceReview() {
        return seviceReview;
    }

    public void setSeviceReview(Double seviceReview) {
        this.seviceReview = seviceReview;
    }

    public Boolean getUsuallyEmploy() {
        return usuallyEmploy;
    }

    public void setUsuallyEmploy(Boolean usuallyEmploy) {
        this.usuallyEmploy = usuallyEmploy;
    }

    public Integer getDriverStatus() {
        return driverStatus;
    }

    public void setDriverStatus(Integer driverStatus) {
        this.driverStatus = driverStatus;
    }

    public Double getDriverLat() {
        return driverLat;
    }

    public void setDriverLat(Double driverLat) {
        this.driverLat = driverLat;
    }

    public Double getDriverLng() {
        return driverLng;
    }

    public void setDriverLng(Double driverLng) {
        this.driverLng = driverLng;
    }

    public Integer getGrade() {
        if (null == grade) {
            return 0;
        }
        return grade;
    }

    public void setGrade(Integer grade) {
        this.grade = grade;
    }

    public Long getSeatsNow() {
        if (null == seatsNow) {
            return 0L;
        }
        return seatsNow;
    }

    public void setSeatsNow(Long seatsNow) {
        this.seatsNow = seatsNow;
    }

    public Long getSeatsTotal() {
        if (null == seatsTotal) {
            return 0L;
        }
        return seatsTotal;
    }

    public void setSeatsTotal(Long seatsTotal) {
        this.seatsTotal = seatsTotal;
    }

    public DriverGrade getDriverGrade() {
        return driverGrade;
    }

    public void setDriverGrade(DriverGrade driverGrade) {
        this.driverGrade = driverGrade;
    }

    public Long getGradeId() {
        return gradeId;
    }

    public void setGradeId(Long gradeId) {
        this.gradeId = gradeId;
    }

    public Integer getRefreshTokenTime() {
        return refreshTokenTime;
    }

    public void setRefreshTokenTime(Integer refreshTokenTime) {
        this.refreshTokenTime = refreshTokenTime;
    }

    public Long getZhuanxianCarId() {
        return zhuanxianCarId;
    }

    public void setZhuanxianCarId(Long zhuanxianCarId) {
        this.zhuanxianCarId = zhuanxianCarId;
    }

    public Truck getZhuanxianCar() {
        return zhuanxianCar;
    }

    public void setZhuanxianCar(Truck zhuanxianCar) {
        this.zhuanxianCar = zhuanxianCar;
    }

    public Long getTruckId() {
        return truckId;
    }

    public void setTruckId(Long truckId) {
        this.truckId = truckId;
    }

    public Truck getTruck() {
        return truck;
    }

    public void setTruck(Truck truck) {
        this.truck = truck;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPhoto() {
        if (StringUtils.isBlank(photo)) {
            return null;
        }
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    public String getIdCardPhoto() {
        if (StringUtils.isBlank(idCardPhoto)) {
            return null;
        }
        return idCardPhoto;
    }

    public void setIdCardPhoto(String idCardPhoto) {
        this.idCardPhoto = idCardPhoto;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPressingName() {
        return pressingName;
    }

    public void setPressingName(String pressingName) {
        this.pressingName = pressingName;
    }

    public String getPressingPhone() {
        return pressingPhone;
    }

    public void setPressingPhone(String pressingPhone) {
        this.pressingPhone = pressingPhone;
    }

    public Date getLicenseTime() {
        return licenseTime;
    }

    public void setLicenseTime(Date licenseTime) {
        this.licenseTime = licenseTime;
    }

    public Long getCarId() {
        return carId;
    }

    public void setCarId(Long carId) {
        this.carId = carId;
    }

    public int getjialing() {
        if (null == licenseTime) {
            return 0;
        }
        Calendar bef = Calendar.getInstance();
        Calendar aft = Calendar.getInstance();
        bef.setTime(licenseTime);
        aft.setTime(new Date());
        int result = aft.get(Calendar.YEAR) - bef.get(Calendar.YEAR);
        if (result == 0) {
            result = 1;
        }
        return result;
    }

    public int getage() {
        if (StringUtils.isBlank(idCard)) {
            return 20;
        } else {
            try {
                int age = IdcardUtils.getAgeByIdCard(idCard);
                if (age <= 0) {
                    return 20;
                } else {
                    return age;
                }
            } catch (Exception e) {
                return 20;
            }
        }
    }

    public String getLicense() {
        if (StringUtils.isBlank(license)) {
            return null;
        }
        return license;
    }

    public void setLicense(String license) {
        this.license = license;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public Boolean getIsFreeze() {
        return BooleanUtils.toBoolean(isFreeze);
    }

    public void setIsFreeze(Boolean isFreeze) {
        this.isFreeze = isFreeze;
    }

    public Integer getStatus() {
        if (null == status) {
            return 0;
        }
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getJobStatus() {
        return jobStatus;
    }

    public void setJobStatus(Integer jobStatus) {
        this.jobStatus = jobStatus;
    }

    public String getAppVersion() {
        return appVersion;
    }

    public void setAppVersion(String appVersion) {
        this.appVersion = appVersion;
    }

    public BigDecimal getVirtual() {
        if (null == virtual) {
            return new BigDecimal(0.00);
        }
        return virtual;
    }

    public void setVirtual(BigDecimal virtual) {
        this.virtual = virtual;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Double getLongitude() {
        return longitude;
    }

    public void setLongitude(Double longitude) {
        this.longitude = longitude;
    }

    public Double getLatitude() {
        return latitude;
    }

    public void setLatitude(Double latitude) {
        this.latitude = latitude;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public Integer getDriveTimes() {
        if (null == driveTimes) {
            return 0;
        }
        return driveTimes;
    }

    public void setDriveTimes(Integer driveTimes) {
        this.driveTimes = driveTimes;
    }

    public Double getDistance() {
        if (null == distance) {
            return 0d;
        }
        return distance;
    }

    public void setDistance(Double distance) {
        this.distance = distance;
    }

    public String getDistanceStr() {
        return distanceStr;
    }

    public void setDistanceStr(String distanceStr) {
        this.distanceStr = distanceStr;
    }

    public Integer getTodayOrders() {
        if (null == todayOrders) {
            return 0;
        }
        return todayOrders;
    }

    public void setTodayOrders(Integer todayOrders) {
        this.todayOrders = todayOrders;
    }

    public Integer getMonthOrders() {
        if (null == monthOrders) {
            return 0;
        }
        return monthOrders;
    }

    public void setMonthOrders(Integer monthOrders) {
        this.monthOrders = monthOrders;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public Company getCompany() {
        return company;
    }

    public void setCompany(Company company) {
        this.company = company;
    }

    public String getCompanyName() {
        if (null != company) {
            return company.getAbbreviation();
        }
        return null;
    }

    public String getUserID() {
        return userID;
    }

    public void setUserID(String userID) {
        this.userID = userID;
    }

    public String getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(String deviceType) {
        this.deviceType = deviceType;
    }

    public String getDeviceInfo() {
        return deviceInfo;
    }

    public void setDeviceInfo(String deviceInfo) {
        this.deviceInfo = deviceInfo;
    }

    public String getUdid() {
        return udid;
    }

    public void setUdid(String udid) {
        this.udid = udid;
    }

    public boolean isWorkCar() {
        return isWorkCar;
    }

    public void setWorkCar(boolean isWorkCar) {
        this.isWorkCar = isWorkCar;
    }

    public String getNamePinyin() {
        return namePinyin;
    }

    public void setNamePinyin(String namePinyin) {
        this.namePinyin = namePinyin;
    }

    public Integer getApplyWorkCar() {
        return applyWorkCar;
    }

    public void setApplyWorkCar(Integer applyWorkCar) {
        this.applyWorkCar = applyWorkCar;
    }

    public Integer getBusyStatus() {
        return busyStatus;
    }

    public void setBusyStatus(Integer busyStatus) {
        this.busyStatus = busyStatus;
    }

    public BigDecimal getAdvance() {
        return advance;
    }

    public void setAdvance(BigDecimal advance) {
        this.advance = advance;
    }

    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    public Double getStarLevel() {
        if (null == starLevel || starLevel == 0) {
            return 5d;
        }
        return starLevel;
    }

    public void setStarLevel(Double starLevel) {
        this.starLevel = starLevel;
    }

    public Integer getHeight() {
        return height;
    }

    public void setHeight(Integer height) {
        this.height = height;
    }

    public String getOrigin() {
        return origin;
    }

    public void setOrigin(String origin) {
        this.origin = origin;
    }

    public String getBigPhoto() {
        if (StringUtils.isBlank(bigPhoto)) {
            return null;
        }
        return bigPhoto;
    }

    public void setBigPhoto(String bigPhoto) {
        this.bigPhoto = bigPhoto;
    }

    public String getLicenseType() {
        return licenseType;
    }

    public void setLicenseType(String licenseType) {
        this.licenseType = licenseType;
    }

    public String getIntroducer() {
        return introducer;
    }

    public void setIntroducer(String introducer) {
        this.introducer = introducer;
    }

    public List<Order> getWorkingOrders() {
        return workingOrders;
    }

    public void setWorkingOrders(List<Order> workingOrders) {
        this.workingOrders = workingOrders;
    }

    public List<Order> getYupaidanOrders() {
        return yupaidanOrders;
    }

    public void setYupaidanOrders(List<Order> yupaidanOrders) {
        this.yupaidanOrders = yupaidanOrders;
    }

    public Double getLastLongitude() {
        return lastLongitude;
    }

    public void setLastLongitude(Double lastLongitude) {
        this.lastLongitude = lastLongitude;
    }

    public Double getLastLatitude() {
        return lastLatitude;
    }

    public void setLastLatitude(Double lastLatitude) {
        this.lastLatitude = lastLatitude;
    }

    public String getCurrentAddress() {
        try {
            if ((null == currentAddress || "未知".equals(currentAddress)) && null != latitude
                && null != longitude) {
                // String address =
                // HttpClientUtil.getPlaceByLngAndLat(longitude, latitude);
                if (null != address) {
                    currentAddress = address;
                } else {
                    currentAddress = "未知";
                }
            }
        } catch (Exception e) {
            currentAddress = "未知";
        }
        return currentAddress;
    }

    public void setCurrentAddress(String currentAddress) {
        this.currentAddress = currentAddress;
    }

    public Order getDiaoduOrder() {
        return diaoduOrder;
    }

    public void setDiaoduOrder(Order diaoduOrder) {
        this.diaoduOrder = diaoduOrder;
    }

    public Long getYupai() {
        return yupai;
    }

    public void setYupai(Long yupai) {
        this.yupai = yupai;
    }

    public Date getPosUpdated() {
        return posUpdated;
    }

    public void setPosUpdated(Date posUpdated) {
        this.posUpdated = posUpdated;
    }

    public Date getDutyTime() {
        return dutyTime;
    }

    public void setDutyTime(Date dutyTime) {
        this.dutyTime = dutyTime;
    }

    public Date getJobTime() {
        if (null == jobTime) {
            return created;
        }
        return jobTime;
    }

    public void setJobTime(Date jobTime) {
        this.jobTime = jobTime;
    }

    public DriverLevel getDriverLevel() {
        return driverLevel;
    }

    public void setDriverLevel(DriverLevel driverLevel) {
        this.driverLevel = driverLevel;
    }

    public DriverLevel getDriverLevelZhuan() {
        return driverLevelZhuan;
    }

    public void setDriverLevelZhuan(DriverLevel driverLevelZhuan) {
        this.driverLevelZhuan = driverLevelZhuan;
    }

    public DriverLevel getDriverLevelPao() {
        return driverLevelPao;
    }

    public void setDriverLevelPao(DriverLevel driverLevelPao) {
        this.driverLevelPao = driverLevelPao;
    }

    public DriverLevel getDriverLevelFreight() {
        return driverLevelFreight;
    }

    public void setDriverLevelFreight(DriverLevel driverLevelFreight) {
        this.driverLevelFreight = driverLevelFreight;
    }

    public DriverLevel getDriverLevelZhuanxian() {
        return driverLevelZhuanxian;
    }

    public void setDriverLevelZhuanxian(DriverLevel driverLevelZhuanxian) {
        this.driverLevelZhuanxian = driverLevelZhuanxian;
    }

    public Long getDriverLevelId() {
        return driverLevelId;
    }

    public void setDriverLevelId(Long driverLevelId) {
        this.driverLevelId = driverLevelId;
    }

    public List<DriverChoseLevel> getDriverChoseLevels() {
        return driverChoseLevels;
    }

    public void setDriverChoseLevels(List<DriverChoseLevel> driverChoseLevels) {
        this.driverChoseLevels = driverChoseLevels;
    }

    public List<DriverChoseLevelCar> getDriverChoseLevelCars() {
        return driverChoseLevelCars;
    }

    public void setDriverChoseLevelCars(List<DriverChoseLevelCar> driverChoseLevelCars) {
        this.driverChoseLevelCars = driverChoseLevelCars;
    }

    public List<DriverChoseLevelPaotui> getDriverChoseLevelPaotuis() {
        return driverChoseLevelPaotuis;
    }

    public void setDriverChoseLevelPaotuis(List<DriverChoseLevelPaotui> driverChoseLevelPaotuis) {
        this.driverChoseLevelPaotuis = driverChoseLevelPaotuis;
    }

    public List<DriverChoseLevelFreight> getDriverChoseLevelFreights() {
        return driverChoseLevelFreights;
    }

    public void setDriverChoseLevelFreights(
        List<DriverChoseLevelFreight> driverChoseLevelFreights) {
        this.driverChoseLevelFreights = driverChoseLevelFreights;
    }

    public List<DriverChoseLevelZhuanxian> getDriverChoseLevelZhuanxians() {
        return driverChoseLevelZhuanxians;
    }

    public void setDriverChoseLevelZhuanxians(
        List<DriverChoseLevelZhuanxian> driverChoseLevelZhuanxians) {
        this.driverChoseLevelZhuanxians = driverChoseLevelZhuanxians;
    }

    public Car getCar() {
        return car;
    }

    public void setCar(Car car) {
        this.car = car;
    }

    public String getDriverJobType() {
        if (StringUtils.isBlank(driverJobType)) {
            return "";
        }
        return driverJobType;
    }

    public void setDriverJobType(String driverJobType) {
        this.driverJobType = driverJobType;
    }

    public BigDecimal getPayCash1() {
        return payCash1;
    }

    public void setPayCash1(BigDecimal payCash1) {
        this.payCash1 = payCash1;
    }

    public BigDecimal getPayCash2() {
        return payCash2;
    }

    public void setPayCash2(BigDecimal payCash2) {
        this.payCash2 = payCash2;
    }

    public BigDecimal getPayCash3() {
        return payCash3;
    }

    public void setPayCash3(BigDecimal payCash3) {
        this.payCash3 = payCash3;
    }

    public Long getPaotuiAmount() {
        return paotuiAmount;
    }

    public void setPaotuiAmount(Long paotuiAmount) {
        this.paotuiAmount = paotuiAmount;
    }

    public OrderInfo getOrderInfo() {
        return orderInfo;
    }

    public void setOrderInfo(OrderInfo orderInfo) {
        this.orderInfo = orderInfo;
    }

    public String getEmployToken() {
        return employToken;
    }

    public void setEmployToken(String employToken) {
        this.employToken = employToken;
    }

    public String getRegistrationId() {
        return registrationId;
    }

    public void setRegistrationId(String registrationId) {
        this.registrationId = registrationId;
    }

    public String getTravel() {
        return travel;
    }

    public void setTravel(String travel) {
        this.travel = travel;
    }

    public String getJobContent() {
        return jobContent;
    }

    public void setJobContent(String jobContent) {
        this.jobContent = jobContent;
    }

    public ServiceType getServiceType() {
        return serviceType;
    }

    public void setServiceType(ServiceType serviceType) {
        this.serviceType = serviceType;
    }

    public Boolean getFreeze() {
        return isFreeze;
    }

    public void setFreeze(Boolean freeze) {
        isFreeze = freeze;
    }

    public String getDriverCensus() {
        return driverCensus;
    }

    public void setDriverCensus(String driverCensus) {
        this.driverCensus = driverCensus;
    }

    public String getAddressCode() {
        return addressCode;
    }

    public void setAddressCode(String addressCode) {
        this.addressCode = addressCode;
    }

    public String getAddressCodeArr() {
        return addressCodeArr;
    }

    public void setAddressCodeArr(String addressCodeArr) {
        this.addressCodeArr = addressCodeArr;
    }

    public String getContractCompany() {
        return contractCompany;
    }

    public void setContractCompany(String contractCompany) {
        this.contractCompany = contractCompany;
    }

    public String getCommercialType() {
        return commercialType;
    }

    public void setCommercialType(String commercialType) {
        this.commercialType = commercialType;
    }

    public String getDriverLicenseId() {
        return driverLicenseId;
    }

    public void setDriverLicenseId(String driverLicenseId) {
        this.driverLicenseId = driverLicenseId;
    }


    public enum DriverJobType {
        /**
         * 代驾
         */
        daijia,
        /**
         * 专车
         */
        zhuanche,
        /**
         * 跑腿
         */
        paotui,
        /**
         * 货车
         */
        freight,
        /**
         * 专线
         */
        zhuanxian,
        /**
         * 全部
         */
        all

    }

}
